import createEvent from "./createEvent";

const schemaObj = {
  tag: "", // 标签名
  config: {}, // 配置
  children: [], // 子项
  data: {}, // 当前域数据源
  events: [], // 绑定事件组  {eventName: '', executor: {} }
  __scopedSlots: {}, // 插槽的描述 {slotName: {}}
  initApi: "" || {}, // 初始化数据的接口
  __parent: {}, // 指向父对象
  hiddenOn: "", // 正则 或简单的逻辑字符串
};

function createSchema(schema) {
  const response = {
    ...schemaObj,
    ...schema,
  };

  return response;
}

export default createSchema;
